<?php
$db = addslashes($_POST["db"]);
$user = addslashes($_POST["user"]);
$password = addslashes($_POST["password"]);
$host = addslashes($_POST["host"]);

$con = mysql_connect("localhost", "root", "");
mysql_select_db($db);
$result = mysql_query("SHOW TABLES");

$data = array();

while($row = mysql_fetch_array($result, MYSQL_NUM)) {
	$data["items"][] = $row[0];
}

echo json_encode($data);

?>